﻿from Position import *

class Item(Position):
    """Descreve um objeto generico Item.
    Itens derivam Armas, Escudos, Armaduras e Acessórios e possuem localizacao no mapa."""

    def __init__(self, nameP = "NULL", priceP = 0.0, iconP = None, 
                 attackP = 0, defenseP = 0, dodgeP = 0, typeP = 1,
                 xP = 0, yP = 0):
        '''Gera um objeto generico com as propriedades:
        nome:NULL, price:0.0, icon:NULL
        attack:0, defense:0, dodge:0
        x:0, y:0
        '''
        self._name = nameP
        self._price = priceP
        self._icon = iconP
        self._attack = attackP
        self._defense = defenseP
        self._dodge = dodgeP
        self._type = typeP
        #from position
        self._x = xP
        self._y = yP

    def getName(self):
        '''==> x.name'''
        return self._name
    def setName(self, nameP):
        '''x.name = nameP'''
        self._name = nameP

    def getPrice(self):
        '''==> x.price'''
        return self._price
    def setPrice(self, priceP):
        '''x.price = priceP'''
        self._price = priceP

    def getIcon(self):
        '''==> x.icon'''
        return self._icon
    def setIcon(self, iconP):
        '''x.icon = iconP'''
        self._icon = iconP

    def getAttack(self):
        '''==> x.attack'''
        return self._attack
    def setAttack(self, priceP):
        '''x.attack = attackP'''
        self._attack = attackP

    def getDefense(self):
        '''==> x.defense'''
        return self._defense
    def setDefense(self, priceP):
        '''x.defense = defenseP'''
        self._defense = defenseP

    def getDodge(self):
        '''==> x.dodge'''
        return self._dodge
    def setDodge(self, dodgeP):
        '''x.dodge = dodgeP'''
        self._dodge = dodgeP

    def getType(self):
        '''==> x.type'''
        return self._type
    def setType(self, typeP):
        '''x.type = typeP'''
        self._type = typeP